<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

class Email_gateway {

	private $sender = 'ihs@smart-con.com';
	private $sender_name = 'SCIHS Admin';

	function send_new_akun_email($email, $username, $password){
		$CI =& get_instance();

		$subject = 'Informasi pendaftaran layanan Smart Connect Internet Home Service';
		$message = "
Selamat!
Anda terdaftar pada layanan Smart Connect Internet Home Service.
Untuk log on ke situs SCIHS, anda dapat menggunakan email/ID dan password dibawah ini

ID: $username
Email: $email
Password: $password

Nikmati layanan Smart Connect lainnya.
Info lebih lanjut hubungi 031-8282374 atau email: ihs@smart-con.com

Terima Kasih,
Administrator Smart Connect Internet Home Service
			";

		$CI->load->library('email');
		$CI->email->set_newline('\r\n');
		$CI->email->from($this->sender,$this->sender_name);
		$CI->email->to($email);
		$CI->email->subject($subject);
		$CI->email->message($message);

		if($CI->email->send()){
			return 'ok';
		} else {
			return $CI->email->print_debugger();
		}
	}

}
